package com.nefu.editor.core.mapper.provider;

import com.nefu.editor.core.model.User;
import org.apache.ibatis.jdbc.SQL;

/**
 * @author chenchenT
 * @date : 18-11-14
 * @since : java 8
 */
public class CartProvider {

    public String selectCartByUserSystemId(User user) {
        return new SQL() {
            {
                SELECT("cart_systemId as systemId, cart_userSystemId as userSystemId, cart_articleSystemId as articleSystemId, cart_sum as sum");
                FROM("t_cart");
                WHERE("cart_userSystemId=#{systemId}");
            }
        }.toString();
    }

}
